Repository navigation
feat(elixir_app): add name, target_compatible_with, testonly and tags - #3
Open
TrapsterDK wants to merge 1 commit into
Open
TrapsterDK wants to merge 1 commit into
TrapsterDK wants to merge 1 commit into
Conversation
elixir_app always creates the targets beam_files, app_file, ebin, elixir_without_app_overlap and erlang_app, with the output dirs beam_files, ebin and unconsolidated. Two apps cannot share a package, and the generated targets cannot be marked incompatible, testonly or tagged. Add a name argument, default "erlang_app". With the default, every target name and output dir stays as it is today. With any other name, the internal targets are named <name>_beam_files, <name>_app_file, <name>_ebin and <name>_elixir_without_app_overlap, and their output dirs are <name>/beam_files, <name>/ebin and <name>/unconsolidated. Add target_compatible_with, testonly and tags, and pass them to all five generated targets. Tests in test/: a build_test and a path check for the default names and output dirs, a second app named "other" (testonly) in the same package, and an app with target_compatible_with incompatible that //... skips and that fails when built directly (checked in CI).
TrapsterDK
added a commit
to devhusdk/rules_dx
that referenced
this pull request
Nov 4, 2026
…rt of #3744) (#6702) The patch now matches the four upstream PRs, so each merge is a pin bump plus deleting one patch file: elixir_app_name (bazelverse/rules_elixir#3), elixir_app_deps (#2), warnings_as_errors (#4) and relocatable_tree (waits on rules_erlang#18). Applied in that order; concatenated they equal the old patch. Claude-Session: https://claude.ai/code/session_011u9TXHDZrfmzFQ2WT8QAKK Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
elixir_appalways creates the targetsbeam_files,app_file,ebin,elixir_without_app_overlapanderlang_app, with the output dirsbeam_files,ebinandunconsolidated. Two apps cannot share a package, and the generated targets cannot be marked incompatible, testonly or tagged.Change
name, default"erlang_app". With the default, every target name and output dir stays exactly as it is today.<name>_beam_files,<name>_app_file,<name>_ebinand<name>_elixir_without_app_overlap, and the output dirs are<name>/beam_files,<name>/ebinand<name>/unconsolidated.target_compatible_with,testonlyandtags, passed to all five generated targets.Test
In
test/:app_targets_test(build_test) builds:erlang_app,:beam_files,:app_file,:ebin,:elixir_without_app_overlapand the five targets of a second app namedother.app_names_testchecks the output dirs:beam_files,ebin,unconsolidatedfor the default app (no prefix), andother/beam_files,other/ebin,other/unconsolidated.otheristestonly. Iftestonlywere not passed to every target, its final target would fail analysis.incompatible_apphastarget_compatible_with = ["@platforms//:incompatible"].//...skips it, and a new CI step checks thatbazelisk build //:incompatible_appfails.test/MODULE.bazelgainsbazel_skylibandplatforms.On
mainthe package does not load, becauseelixir_apphas nonameargument.Test output (OTP 29.0, Elixir 1.20.3, Bazel 9.2.0,
--nohome_rc)bazel test //...intest/: Executed 2 out of 6 tests: 6 tests pass. The CI negative checks (failing_test,broken_test,empty_test) fail as expected.//:incompatible_appfails to build as expected. The OTP 28.5 / Elixir 1.19.5 pair was not run as a whole.Assisted by Claude.